<div class="contenidofijo">
<div class="ciuexams">

    <?php 
		$extra="";
		if(isset($plan['Ciuplan'])){
			$extra = " de ". $plan['Ciuplan']['name'];
		}
	?>
	<?php $url=$this->Html->link("Todos", array('controller'=>'ciuexams','action' => 'index')); ?>
    <?php echo $this->element("breadcrumb", array('tokens'=>array($url,"Exámenes". $extra)) ); ?>
	
	<div class="subtitulo">
		<?php $htmlcaption = "Falta(n) " .$peopleleft ." persona(s) por programar examen."; ?>
		<?php echo $this->Html->link($htmlcaption, array('controller'=>'ciuusers','action' => 'indexapplicant')); ?>
		<button id="nuevoexamen">
			<?php echo $this->Html->link('Adicionar', array('action' => 'add')); ?>
		</button>
	</div>
	<div class="clearfix">&nbsp;</div>
	<table class="zebra" cellpadding="0" cellspacing="0">
	<thead>
	<tr>
		<th class="left"><?php echo $this->Paginator->sort('Código Examen');?></th>
		<th class="left"><?php echo $this->Paginator->sort('Nombre');?></th>
		<th class="left"><?php echo $this->Paginator->sort('people_count');?></th>		
		<th class="left"><?php echo $this->Paginator->sort('examination_date');?></th>
		<th class="left"><?php echo $this->Paginator->sort('location');?></th>
		<th class="left"><?php echo $this->Paginator->sort('ciuplan_id');?></th>
		<th class="left"><?php echo $this->Paginator->sort('ciuexamstate_id');?></th>
		<th class="left actions"><?php __('Actions');?></th>
	</tr>
	</thead>
	<tbody>
	<?php
	$i = 0;
	foreach ($ciuexams as $ciuexam):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $ciuexam['Ciuexam']['id']; ?>&nbsp;</td>
		<td class="left"><?php echo $ciuexam['Ciuexam']['name']; ?>&nbsp;</td>
		<td><?php echo $ciuexam['Ciuexam']['people_count']; ?>&nbsp;</td>
		
		<td><?php echo $ciuexam['Ciuexam']['examination_date']; ?>&nbsp;</td>
		<td class="left"><?php echo $ciuexam['Ciuexam']['location']; ?>&nbsp;</td>
		<td class="left">
			<?php echo $ciuexam['Ciuplan']['name']; ?>		
		</td>
		<td class="left">
			<?php echo $ciuexam['Ciuexamstate']['name']; ?>
		</td>
		<td class="actions">
			<?php echo $this->Html->link(__('View', true), array('action' => 'view', $ciuexam['Ciuexam']['id'])); ?>
			<?php echo $this->Html->link(__('Assign', true), array('action' => 'assign', $ciuexam['Ciuexam']['id'])); ?>
			<?php echo $this->Html->link(__('Notify', true), array('action' => 'notify', $ciuexam['Ciuexam']['id'])); ?>	
		</td>
	</tr>
<?php endforeach; ?>
    </tbody>
	</table>
	
	<div class="paginatorcounter">
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
	));
	?>	
	</div>
	
	<div class="paging">
		<?php echo $this->Paginator->first('<< ' , array(), null, array('class'=>'disabled'));?>
		<?php echo $this->Paginator->prev( __('previous', true), array(), null, array('class'=>'disabled'));?>
		|<?php echo $this->Paginator->numbers();?>|
		<?php echo $this->Paginator->next( __('next', true) , array(), null, array('class' => 'disabled'));?>
		<?php echo $this->Paginator->last( ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>
</div>